package cn.tfyhyc.springcloud.controller;

import cn.tfyhyc.springcloud.service.ICustomMessageProvider;
import cn.tfyhyc.springcloud.service.IMessageProvider;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 头发又黑又长
 * @Date 2022/10/18 15:42
 * @email zwb15083976291@163.com
 */
@RestController
public class MessageProviderController {
    @Resource
    private IMessageProvider messageProvider;


    @GetMapping("/send")
    public String send() {
        return messageProvider.send();
    }

    @Resource
    private ICustomMessageProvider customMessageProvider;

    // 自定义的管道
    @GetMapping("/sendCustom")
    public String sendCustom() {
        return customMessageProvider.send();
    }


}
